<template>
  <div id="userLayout" :class="['user-layout-wrapper', device]">
    <div class="container">
      <!-- <div class="logoBox">
        <img src="~@/assets/babymo/logo.png" alt="">
        供应商后台
      </div> -->
      <vue-particles
        color="#dedede"
        :particleOpacity="0.6"
        :particlesNumber="80"
        shapeType="star"
        :particleSize="0.1"
        linesColor="#FFFFFF"
        :linesWidth="1"
        :lineLinked="true"
        :lineOpacity="0.4"
        :linesDistance="150"
        :moveSpeed="1"
        :hoverEffect="true"
        hoverMode="grab"
        :clickEffect="false"
        clickMode="repulse"
        class="cash"
      >
      </vue-particles>
      <!-- <div class="bg1"></div> -->
      <div class="LoginView">
        <!-- <div class="backgroundImage">
          <img src="~@/assets/images/Banner.png">
        </div> -->
        <div class="loginRight">
          <div class="top">
            <div class="header" style="height: 84px;">
              <a href="/">
                <!-- <img  style="width: 190px;" src="~@/assets/babymo/logo.png" class="logo" alt="logo"> -->
                <span class="title">药界-商品供应商后台</span>
              </a>
            </div>
            <!-- <div class="desc">
              欢迎登录！
            </div> -->
          </div>
          <route-view></route-view>
        </div>
      </div>
      <div class="footer">
        <!-- <div class="links">
          <a href="###">帮助</a>
          <a href="###">隐私</a>
          <a href="###">条款</a>
        </div> -->
        <div class="copyright">
          Copyright &copy; 2024 - 药界-商品供应商后台
        </div>
      </div>
    </div>
  </div>
</template>
<script>
  import RouteView from './RouteView';
  import {mixinDevice} from '@/utils/mixin';

  export default {
    name: 'UserLayout',
    components: {RouteView},
    mixins: [mixinDevice],
    data() {
      return {};
    },
    mounted() {
      document.body.classList.add('userLayout');
    },
    beforeDestroy() {
      document.body.classList.remove('userLayout');
    },
  };
</script>
<style lang="stylus" scoped>
  #userLayout.user-layout-wrapper
    height: 100%;

    &.mobile
      .container
        .main
          max-width: 368px;
          width: 98%;

    .container
      width: 100%;
      height: 100%;
      background: #f0f2f5 url("~@/assets/images/ColorBg.jpg") no-repeat 50%;
      background-size: 100% 100%;
      // background: linear-gradient(180deg, #FFFFFF 0%, #FDFDFD 50%, #FFF4FC 100%);
      overflow hidden;
      position: relative;

      .bg1
        width: 85%;
        height: 85%;
        position: absolute;
        top:0;
        left:0;
        right:0;
        bottom:0;
        margin: auto;
        background: url("~@/assets/nfcImg/loginBg.png") no-repeat;
        background-size: 100% 100%;

      .cash
        height inherit !important
        /* background: rgba(0, 0, 0, .6) !important; */
        z-index: 0 !important;

      a
        text-decoration: none;

      .top
        text-align: center;

        .header
          height: 44px;
          line-height: 60px;

          .badge
            position: absolute;
            display: inline-block;
            line-height: 1;
            vertical-align: middle;
            margin-left: -12px;
            margin-top: -10px;
            opacity: 0.8;

          .logo
            // height: 44px;
            vertical-align: top;
            margin-right: 16px;
            border-style: none;

          .title
            font-size: 33px;
            color: rgba(0, 0, 0, .85);
            font-family: Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif;
            font-weight: 600;
            position: relative;
            top: 2px;

        .desc
          font-size: 22px;
          font-weight: bold;
          // color: rgba(0, 0, 0, 0.45);
          color: #333;
          margin-top: 12px;
          /* margin-bottom: 10px; */
          margin: 20px 0 20px 0;

      .main
        min-width: 260px;
        width: 368px;
        margin: 0 auto;

      .footer
        position: absolute;
        width: 100%;
        bottom: 0;
        padding: 0 16px;
        margin: 48px 0 24px;
        text-align: center;

        .links
          margin-bottom: 8px;
          font-size: 14px;

          a
            color: rgba(255, 255, 255, 1);
            transition: all 0.3s;

            &:not(:last-child)
              margin-right: 40px;

        .copyright
          color: rgba(255, 255, 255, 1);
          font-size: 14px;
  .logoBox{
    display: flex;
    align-items: center;
    margin: 50px 0 0 50px
    img{
      width 190px;
      margin-right: 15px;
    }
    font-size:36px;
    font-weight:bold;
    color: #F548AB;
  }

  .backgroundImage {
    // background: url("~@/assets/babymo/bg1.png") no-repeat 50%;
    width: 556px;
    height: inherit;
    // margin-bottom: 80px;
    // background-size: 100% 100%;
    border-style: none;
    // overflow: hidden;
    img{
      // margin-bottom: -80px;
      width: 100%;
      height: 100%;
    }
  }

  .LoginView {
    position: absolute;
    top: 46%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* background: #fff; */
    display: flex;
    border-radius: 12px;
    overflow: hidden
    align-items: center;
  }

  .loginRight {
    // margin-left: 50px;
    padding: 20px 25px;
    display: flex;
    background: rgba(255,255,255,.8);
    flex-direction: column;
    align-items: center;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.06);
    border-radius:18px;
    transform: scale(.9);
  }

  @media screen and (max-width: 480px) {
    .logoBox,.backgroundImage {
      display none
    }
    .loginRight {
      padding: 40px 40px 40px 40px;
      display: flex;
      flex-direction: column;
      align-items: center
      margin: 0;
    }
    #userLayout.user-layout-wrapper .container .top .header .title{
      font-size: 26px;
    }
  }
</style>
